﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class HtmlControl : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            TestLink.Title = "访问百度";
            TestLink.Target = "_blank";
            TestLink.HRef = "http://www.baidu.com";
            TestLink.InnerText = "百度";
            TestServerLink.InnerText = "访问服务端方法";
        }
    }
    protected void TestServerLink_ServerClick(object sender, EventArgs e)
    {
        Literal1.Text = "获取访问HTML控件的文本值为：" + TestServerLink.InnerText;
    }
}